﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    //定义一个员工类，存放用户的工号、姓名和部门信息；定义两个构造函数，一个是无参；
    //一个有参构造函数，对类的属性进行初始化。
    class Yuangong
    {
        private int gonghao;

        public int Gonghao
        {
            get { return gonghao; }
            set { gonghao = value; }
        }

        private string name;

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        private string department;

        public string Department
        {
            get { return department; }
            set { department = value; }
        }

        public Yuangong(int gonghao, string name, string department)
        {
            this.gonghao = gonghao;
            this.name = name;
            this.department = department;
        }
    }
}
